<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
	function PreviewWindow(sBSNo) {
		if (frmslip.edtBSNO.value == "") {
			alert("Please Enter Form Flow Process");
			frmslip.edtFileName.focus();
			return false;
		} else {
			window.open("../common/multipleformflow.cfm?sBSNo=" + sBSNo, "PreviewWindow", "width=700,height=400,ScrollBars=Yes,Resizable=Yes,Toolbars=no");
		}
	}
	function ShowLookup(level, tblname, frmfldcode, formname, fld2disp, fldcode, frmflddesc, flddesc, fldFilter, fldVal) {
		<CFOUTPUT>
			open("#client.common_path#poplookup.cfm" +
		</CFOUTPUT>
			"?tl=" + level +
			"&tn=" + tblname +
			"&fn=" + frmfldcode +
			"&frm=" + formname +
			"&fldprop=" + fld2disp +
			"&fldfn=" + fldcode +
			"&desc=" + frmflddesc +
			"&flddesc=" + flddesc +
			"&fldFilter=" + fldFilter +
			"&fldVal=" + fldVal +
			"&fldFilter=" + fldFilter +
			"&fldVal=" + fldVal,
			"LookupWindow", "width=660,height=330,ScrollBars=Yes,Resizable=Yes")
	}
//-->
</SCRIPT>

<CFIF isDefined("url.sBSNo")>
	<CFSET Form.edtFileName = url.sBSNo>
	<CFINCLUDE TEMPLATE="editform.cfm">
</CFIF>
<CFQUERY NAME="GetProcess" DATASOURCE="#client.company_dsn#">
	SELECT *
	FROM CINFFPROCESS
	WHERE (PROCESSCODE = '#GetForm.PROCESSCODE#')
	ORDER BY DESCRIPTION
</CFQUERY>
<CFSET edtFormFlowVal = "#GetProcess.Description#">
<CFSET edtFormFlowDesc = "#GetProcess.PROCESSCODE#">
<CFSET sLookupEnabled=TRUE>
<CFSET noValue="">
<CFMODULE TEMPLATE="#client.common_path#cfm_wswindow.cfm" TITLE="Select Form Flow Process">
<CFOUTPUT>
<FORM NAME="eform"  METHOD="Post" ENCTYPE="multipart/form-data">
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=1 WIDTH="100%" BGCOLOR="FFFFFFF">
	<TR>
		<TD WIDTH="100%">
			<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH="100%">
				<TR><TD HEIGHT="10"></td></tr>
				<TR>
					<CFMODULE TEMPLATE="#client.common_path#cfm_htmlobject.cfm"
						TYPE="LOOKUP"
						HTMLNAME="edtFormFlow" VALUE="#edtFormFlowVal#"
						DESCRIPTION="&nbsp;&nbsp;&nbsp;Form Flow Process:"
						SIZE="55"
						MAXLENGTH="100"
						LKENABLED=#sLookupEnabled#
						PARAMETERS="#edtFormFlowDesc#|javascript:ShowLookup('C','CINFFPROCESS','edtFormFlow','eform',
						'Description~DESCRIPTION~ftString,Process Code~PROCESSCODE~ftString'
						,'DESCRIPTION','edtFormFlowDesc','PROCESSCODE','#noValue#','#noValue#')">
				</TR>
			</TABLE>
		</TD>
	</TR>
	<TR><TD HEIGHT="10"></td></tr>
	<TR>
		<TD HEIGHT=30>&nbsp;&nbsp;
			<INPUT TYPE="SUBMIT" name="btnnewFormFlow" VALUE="Show Form Flow" ONCLICK="PreviewWindow(document.frmslip.edtFormFlow.value);">&nbsp;
		</TD>
	</TR>
	<TR><TD HEIGHT="10"></td></tr>
</TABLE>
</FORM>
</CFOUTPUT>
<CFMODULE TEMPLATE="#client.common_path#cfm_wswindow.cfm" TOP="False">
